$OpenBSD: patch-configure,v 1.8 2013/06/01 14:18:40 ajacoutot Exp $
--- configure.orig	Wed May 23 22:28:25 2012
+++ configure	Sun Jul  8 18:18:32 2012
@@ -2305,8 +2305,8 @@ case `uname -s` in
 	OpenBSD | FreeBSD | NetBSD)
 		# *BSD has important stuff (from ports)
 		# in /usr/local ...
-		CFLAGS="$CFLAGS -I/usr/local/include -L/usr/local/lib"
-		LDFLAGS="$LDFLAGS -L/usr/local/lib"
+		CFLAGS="$CFLAGS $CPPFLAGS"
+		LDFLAGS="$LDFLAGS"
 		FOUND_OS="bsd"
 		;;
 	Darwin)
@@ -2336,7 +2336,7 @@ $as_echo "maybe" >&6; }
 esac
 
 
-TCLSH=`which tclsh`
+#TCLSH=`which tclsh`
 VERSION=`echo "puts $::tcl_version ; exit" | ${TCLSH}`
 # Check whether --enable-version-check was given.
 if test "${enable_version_check+set}" = set; then :
@@ -3036,17 +3036,9 @@ $as_echo "$ac_cv_prog_cc_g" >&6; }
 if test "$ac_test_CFLAGS" = set; then
   CFLAGS=$ac_save_CFLAGS
 elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
+  CFLAGS="-g"
 else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
+  CFLAGS=
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
@@ -3389,18 +3381,11 @@ $as_echo "$ac_cv_prog_cxx_g" >&6; }
 if test "$ac_test_CXXFLAGS" = set; then
   CXXFLAGS=$ac_save_CXXFLAGS
 elif test $ac_cv_prog_cxx_g = yes; then
-  if test "$GXX" = yes; then
-    CXXFLAGS="-g -O2"
-  else
-    CXXFLAGS="-g"
-  fi
+  CXXFLAGS="-g"
 else
-  if test "$GXX" = yes; then
-    CXXFLAGS="-O2"
-  else
-    CXXFLAGS=
-  fi
+  CXXFLAGS=
 fi
+
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -3445,8 +3430,7 @@ $as_echo_n "checking tcl build dir... " >&6; }
 		/usr/local/lib64 \
 		/usr/lib64 \
 		/usr/lib64/tcl8.* \
-		/usr/local/lib64/tcl8.* \
-		`locate tclConfig.sh`"
+		/usr/local/lib64/tcl8.*"
 
 	for i in $dirs ; do
 
@@ -3570,8 +3554,7 @@ $as_echo_n "checking tk build dir... " >&6; }
 		/usr/local/lib64 \
 		/usr/lib64 \
 		/usr/lib64/tk8.* \
-		/usr/local/lib64/tk8.* \
-		`locate tkConfig.sh`"
+		/usr/local/lib64/tk8.*"
 
 
 		for i in $dirs ; do
